<!--
Copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<title>Boost.Hana: Euclidean Ring</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
MathJax.Hub.Config({
    "HTML-CSS": {
        linebreaks: {
            automatic: true,
            width: "75% container"
        }
    }
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<!-- Additional javascript for drawing charts. -->
<script type="text/javascript" src="highcharts.js"></script>
<script type="text/javascript" src="highcharts-data.js"></script>
<script type="text/javascript" src="highcharts-exporting.js"></script>
<script type="text/javascript" src="chart.js"></script>
<script type="text/javascript" src="hana.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Boost.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Boost.Hana
   &#160;<span id="projectnumber">1.7.1</span>
   </div>
   <div id="projectbrief">Your standard library for metaprogramming</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__group-_euclidean_ring.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">Euclidean Ring<div class="ingroups"><a class="el" href="group__group-concepts.html">Concepts</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>The <code>EuclideanRing</code> concept represents a commutative <code>Ring</code> that can also be endowed with a division algorithm. </p>
<p>A Ring defines a binary operation often called <em>multiplication</em> that can be used to combine two elements of the ring into a new element of the ring. An <a href="https://en.wikipedia.org/wiki/Euclidean_domain">Euclidean ring</a>, also called an Euclidean domain, adds the ability to define a special function that generalizes the Euclidean division of integers.</p>
<p>However, an Euclidean ring must also satisfy one more property, which is that of having no non-zero zero divisors. In a Ring <code>(R, +, *)</code>, it follows quite easily from the axioms that <code>x * 0 == 0</code> for any ring element <code>x</code>. However, there is nothing that mandates <code>0</code> to be the only ring element sending other elements to <code>0</code>. Hence, in some Rings, it is possible to have elements <code>x</code> and <code>y</code> such that <code>x * y == 0</code> while not having <code>x == 0</code> nor <code>y == 0</code>. We call these elements divisors of zero, or zero divisors. For example, this situation arises in the Ring of integers modulo 4 (the set <code>{0, 1, 2, 3}</code>) with addition and multiplication <code>mod 4</code> as binary operations. In this case, we have that </p><div class="fragment"><div class="line">2 * 2 == 4</div>
<div class="line">      == 0 (<a class="code" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">mod</a> 4)</div>
<div class="ttc" id="agroup__group-_euclidean_ring_html_ga9b47b223d5b02db933b3c93b5bd1a062"><div class="ttname"><a href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">boost::hana::mod</a></div><div class="ttdeci">constexpr auto mod</div><div class="ttdoc">Generalized integer modulus.</div><div class="ttdef"><b>Definition:</b> mod.hpp:46</div></div>
</div><!-- fragment --><p> even though <code>2 != 0 (mod 4)</code>.</p>
<p>Following this line of thought, an Euclidean ring requires its only zero divisor is zero itself. In other words, the multiplication in an Euclidean won't send two non-zero elements to zero. Also note that since multiplication in a <code>Ring</code> is not necessarily commutative, it is not always the case that </p><div class="fragment"><div class="line">x * y == 0  implies  y * x == 0</div>
</div><!-- fragment --><p> To be rigorous, we should then distinguish between elements that are zero divisors when multiplied to the right and to the left. Fortunately, the concept of an Euclidean ring requires the Ring multiplication to be commutative. Hence, </p><div class="fragment"><div class="line">x * y == y * x</div>
</div><!-- fragment --><p> and we do not have to distinguish between left and right zero divisors.</p>
<p>Typical examples of Euclidean rings include integers and polynomials over a field. The method names used here refer to the Euclidean ring of integers under the usual addition, multiplication and division operations.</p>
<h2><a class="anchor" id="autotoc_md94"></a>
Minimal complete definition</h2>
<p><code>div</code> and <code>mod</code> satisfying the laws below</p>
<h2><a class="anchor" id="autotoc_md95"></a>
Laws</h2>
<p>To simplify the reading, we will use the <code>+</code>, <code>*</code>, <code>/</code> and <code>%</code> operators with infix notation to denote the application of the corresponding methods in Monoid, Group, Ring and EuclideanRing. For all objects <code>a</code> and <code>b</code> of an <code>EuclideanRing</code> <code>R</code>, the following laws must be satisfied: </p><div class="fragment"><div class="line">a * b == b * a <span class="comment">// commutativity</span></div>
<div class="line">(a / b) * b + a % b == a    <span class="keywordflow">if</span> b is non-<a class="code" href="group__group-_monoid.html#gad459ac17b6bab8ead1cae7de0032f3c6">zero</a></div>
<div class="line">zero&lt;R&gt;() % b == zero&lt;R&gt;()  if b is non-<a class="code" href="group__group-_monoid.html#gad459ac17b6bab8ead1cae7de0032f3c6">zero</a></div>
<div class="ttc" id="agroup__group-_monoid_html_gad459ac17b6bab8ead1cae7de0032f3c6"><div class="ttname"><a href="group__group-_monoid.html#gad459ac17b6bab8ead1cae7de0032f3c6">boost::hana::zero</a></div><div class="ttdeci">constexpr auto zero</div><div class="ttdoc">Identity of plus.</div><div class="ttdef"><b>Definition:</b> zero.hpp:30</div></div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md96"></a>
Refined concepts</h2>
<p><code>Monoid</code>, <code>Group</code>, <code>Ring</code></p>
<h2><a class="anchor" id="autotoc_md97"></a>
Concrete models</h2>
<p><code><a class="el" href="structboost_1_1hana_1_1integral__constant.html" title="Compile-time value of an integral type.">hana::integral_constant</a></code></p>
<h2><a class="anchor" id="autotoc_md98"></a>
Free model for non-boolean integral data types</h2>
<p>A data type <code>T</code> is integral if <code>std::is_integral&lt;T&gt;::value</code> is true. For a non-boolean integral data type <code>T</code>, a model of <code>EuclideanRing</code> is automatically defined by using the <code>Ring</code> model provided for arithmetic data types and setting </p><div class="fragment"><div class="line"><a class="code" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">div</a>(x, y) = (x / y)</div>
<div class="line"><a class="code" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">mod</a>(x, y)  = (x % y)</div>
<div class="ttc" id="agroup__group-_euclidean_ring_html_ga4225a7988ce98903228913dde53762df"><div class="ttname"><a href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">boost::hana::div</a></div><div class="ttdeci">constexpr auto div</div><div class="ttdoc">Generalized integer division.</div><div class="ttdef"><b>Definition:</b> div.hpp:43</div></div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>The rationale for not providing an EuclideanRing model for <code>bool</code> is the same as for not providing Monoid, Group and Ring models. </dd></dl>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ga4225a7988ce98903228913dde53762df"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">boost::hana::div</a></td></tr>
<tr class="memdesc:ga4225a7988ce98903228913dde53762df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generalized integer division.  <a href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">More...</a><br /></td></tr>
<tr class="separator:ga4225a7988ce98903228913dde53762df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9b47b223d5b02db933b3c93b5bd1a062"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">boost::hana::mod</a></td></tr>
<tr class="memdesc:ga9b47b223d5b02db933b3c93b5bd1a062"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generalized integer modulus.  <a href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">More...</a><br /></td></tr>
<tr class="separator:ga9b47b223d5b02db933b3c93b5bd1a062"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ga4225a7988ce98903228913dde53762df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4225a7988ce98903228913dde53762df">&#9670;&nbsp;</a></span>div</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr auto boost::hana::div</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">constexpr</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="fwd_2div_8hpp.html">boost/hana/fwd/div.hpp</a>&gt;</code></p>
<b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; x, <span class="keyword">auto</span>&amp;&amp; y) -&gt; decltype(<span class="keyword">auto</span>) {</div>
<div class="line">        <span class="keywordflow">return</span> tag-dispatched;</div>
<div class="line">    }</div>
</div><!-- fragment -->
<p>Generalized integer division. </p>
<h2><a class="anchor" id="autotoc_md203"></a>
Cross-type version of the method</h2>
<p>The <code>div</code> method is "overloaded" to handle distinct data types with certain properties. Specifically, <code>div</code> is defined for <em>distinct</em> data types <code>A</code> and <code>B</code> such that</p><ol type="1">
<li><code>A</code> and <code>B</code> share a common data type <code>C</code>, as determined by the <code>common</code> metafunction</li>
<li><code>A</code>, <code>B</code> and <code>C</code> are all <code>EuclideanRing</code>s when taken individually</li>
<li><code>to&lt;C&gt; : A -&gt; B</code> and <code>to&lt;C&gt; : B -&gt; C</code> are <code>Ring</code>-embeddings, as determined by the <code>is_embedding</code> metafunction.</li>
</ol>
<p>In that case, the <code>div</code> method is defined as </p><div class="fragment"><div class="line"><a class="code" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">div</a>(x, y) = <a class="code" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">div</a>(to&lt;C&gt;(x), to&lt;C&gt;(y))</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md204"></a>
Example</h2>
<div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="div_8hpp.html">boost/hana/div.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="integral__constant_8hpp.html">boost/hana/integral_constant.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__group-assertions.html#ga2c5006540936d9f8880e3a39f4fcc035">BOOST_HANA_CONSTANT_CHECK</a>(<a class="code" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">hana::div</a>(hana::int_c&lt;6&gt;, hana::int_c&lt;3&gt;) == hana::int_c&lt;2&gt;);</div>
<div class="line"><a class="code" href="group__group-assertions.html#ga2c5006540936d9f8880e3a39f4fcc035">BOOST_HANA_CONSTANT_CHECK</a>(<a class="code" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">hana::div</a>(hana::int_c&lt;6&gt;, hana::int_c&lt;4&gt;) == hana::int_c&lt;1&gt;);</div>
<div class="line"> </div>
<div class="line">static_assert(<a class="code" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">hana::div</a>(6, 3) == 2, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(<a class="code" href="group__group-_euclidean_ring.html#ga4225a7988ce98903228913dde53762df">hana::div</a>(6, 4) == 1, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
<div class="ttc" id="aassert_8hpp_html"><div class="ttname"><a href="assert_8hpp.html">assert.hpp</a></div><div class="ttdoc">Defines macros to perform different kinds of assertions.</div></div>
<div class="ttc" id="adiv_8hpp_html"><div class="ttname"><a href="div_8hpp.html">div.hpp</a></div><div class="ttdoc">Defines boost::hana::div.</div></div>
<div class="ttc" id="aequal_8hpp_html"><div class="ttname"><a href="equal_8hpp.html">equal.hpp</a></div><div class="ttdoc">Defines boost::hana::equal.</div></div>
<div class="ttc" id="agroup__group-assertions_html_ga2c5006540936d9f8880e3a39f4fcc035"><div class="ttname"><a href="group__group-assertions.html#ga2c5006540936d9f8880e3a39f4fcc035">BOOST_HANA_CONSTANT_CHECK</a></div><div class="ttdeci">#define BOOST_HANA_CONSTANT_CHECK(...)</div><div class="ttdoc">Equivalent to BOOST_HANA_CONSTANT_ASSERT, but not influenced by the BOOST_HANA_CONFIG_DISABLE_ASSERTI...</div><div class="ttdef"><b>Definition:</b> assert.hpp:239</div></div>
<div class="ttc" id="aintegral__constant_8hpp_html"><div class="ttname"><a href="integral__constant_8hpp.html">integral_constant.hpp</a></div><div class="ttdoc">Defines boost::hana::integral_constant.</div></div>
<div class="ttc" id="anamespaceboost_1_1hana_html"><div class="ttname"><a href="namespaceboost_1_1hana.html">boost::hana</a></div><div class="ttdoc">Namespace containing everything in the library.</div><div class="ttdef"><b>Definition:</b> accessors.hpp:20</div></div>
</div><!-- fragment --> 
</div>
</div>
<a id="ga9b47b223d5b02db933b3c93b5bd1a062"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9b47b223d5b02db933b3c93b5bd1a062">&#9670;&nbsp;</a></span>mod</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr auto boost::hana::mod</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">constexpr</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="fwd_2mod_8hpp.html">boost/hana/fwd/mod.hpp</a>&gt;</code></p>
<b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; x, <span class="keyword">auto</span>&amp;&amp; y) -&gt; decltype(<span class="keyword">auto</span>) {</div>
<div class="line">        <span class="keywordflow">return</span> tag-dispatched;</div>
<div class="line">    }</div>
</div><!-- fragment -->
<p>Generalized integer modulus. </p>
<p>Given two elements of an EuclideanRing <code>x</code> and <code>y</code>, with <code>y</code> nonzero, <code>mod</code> returns the modulus of the division of <code>x</code> by <code>y</code>. In other words, <code>mod</code> can be seen as an equivalent to <code>%</code>.</p>
<h2><a class="anchor" id="autotoc_md281"></a>
Cross-type version of the method</h2>
<p>The <code>mod</code> method is "overloaded" to handle distinct data types with certain properties. Specifically, <code>mod</code> is defined for <em>distinct</em> data types <code>A</code> and <code>B</code> such that</p><ol type="1">
<li><code>A</code> and <code>B</code> share a common data type <code>C</code>, as determined by the <code>common</code> metafunction</li>
<li><code>A</code>, <code>B</code> and <code>C</code> are all <code>EuclideanRing</code>s when taken individually</li>
<li><code>to&lt;C&gt; : A -&gt; B</code> and <code>to&lt;C&gt; : B -&gt; C</code> are <code>Ring</code>-embeddings, as determined by the <code>is_embedding</code> metafunction.</li>
</ol>
<p>In that case, <code>mod</code> is defined as </p><div class="fragment"><div class="line"><a class="code" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">mod</a>(x, y) = <a class="code" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">mod</a>(to&lt;C&gt;(x), to&lt;C&gt;(y))</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md282"></a>
Example</h2>
<div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="integral__constant_8hpp.html">boost/hana/integral_constant.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="mod_8hpp.html">boost/hana/mod.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__group-assertions.html#ga2c5006540936d9f8880e3a39f4fcc035">BOOST_HANA_CONSTANT_CHECK</a>(<a class="code" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">hana::mod</a>(hana::int_c&lt;6&gt;, hana::int_c&lt;4&gt;) == hana::int_c&lt;2&gt;);</div>
<div class="line"><a class="code" href="group__group-assertions.html#ga2c5006540936d9f8880e3a39f4fcc035">BOOST_HANA_CONSTANT_CHECK</a>(<a class="code" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">hana::mod</a>(hana::int_c&lt;-6&gt;, hana::int_c&lt;4&gt;) == hana::int_c&lt;-2&gt;);</div>
<div class="line">static_assert(<a class="code" href="group__group-_euclidean_ring.html#ga9b47b223d5b02db933b3c93b5bd1a062">hana::mod</a>(6, 4) == 2, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
<div class="ttc" id="amod_8hpp_html"><div class="ttname"><a href="mod_8hpp.html">mod.hpp</a></div><div class="ttdoc">Defines boost::hana::mod.</div></div>
</div><!-- fragment --> 
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
  </ul>
</div>
</body>
</html>
